package com.winit.cloudlink.command;

import java.io.Serializable;

/**
 * Created by stvli on 2015/11/12.
 */
public class CommandHeaders implements Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = -472631452104482760L;
	protected String commandName;
	protected String shardKey;
	private String fromAppId;
	private String toAppId;
	private String commandId;
	private long timestamp;

	public String getCommandName() {
		String mesageType = this.commandName;
//        if (null != this.shardKey && this.shardKey.trim().length() > 0) {
//            mesageType = mesageType + Constants.MESSAGE_SHARD_KEY_SEPARATOR + this.shardKey.trim();
//        }
		mesageType = mesageType + Constants.COMMAND_SUFFIX;
		return mesageType;
	}

	public void setCommandName(String commandName) {
		this.commandName = commandName;
	}

	public String getToAppId() {
		return toAppId;
	}

	public void setToAppId(String toAppId) {
		this.toAppId = toAppId;
	}

	public long getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}

	public String getCommandId() {
		return commandId;
	}

	public void setCommandId(String commandId) {
		this.commandId = commandId;
	}

	public String getFromAppId() {
		return fromAppId;
	}

	public void setFromAppId(String fromAppId) {
		this.fromAppId = fromAppId;
	}

	public String getShardKey() {
		return shardKey;
	}

	public void setShardKey(String shardKey) {
		this.shardKey = shardKey;
	}

}
